package edu.zut.cs.software.estateagent.user.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import edu.zut.cs.software.base.domain.BaseEntity;

@Table(name = "T_User") // 声名数据库表名
@Entity // 声名持久化类
public class User extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 33775908080609929L; // 生成序列化ID，防止反序列化失败

	private long id; // 用户ID
	
	private String UserName; // 用户昵称

	private String UserSex; // 用户性别
	
	private String email; // 用户邮箱
		
	private String UserTel; // 用户电话号码
	
	private String address; // 家庭住址

	// 用注解描述持久化类和数据库表的对应联系
	@GeneratedValue(strategy = GenerationType.AUTO) // 生成主键的方式
	@Id // 映射主键属性
	@Column(name = "C_no") // 声名id在数据库的列名
	public Long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getUserName() {
		return UserName;
	}

	public void setUserName(String userName) {
		UserName = userName;
	}

	public String getUserSex() {
		return UserSex;
	}

	public void setUserSex(String userSex) {
		UserSex = userSex;
	}

	public String getUserTel() {
		return UserTel;
	}

	public void setUserTel(String userTel) {
		UserTel = userTel;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	

	

}